package com.sf.decorator;

/**
 * @author 埔枘
 * @date 2019/12/03
 **/
public class DecoratorTest {

    public static void main(String[] args) {
        HandCake handCake = null;
        //制作一个基础的手抓饼
        handCake = new BaseHandCake();

        handCake = new EaggHandCakeDecorator(handCake);
        handCake = new EaggHandCakeDecorator(handCake);
        handCake = new EaggHandCakeDecorator(handCake);
        handCake = new SausageHandCakeDecorator(handCake);

        System.out.println("结账:"+handCake.getName()+"-----"+handCake.getPrice());

    }
}
